package com.kupurui.asteacher.adapter;

import android.content.Context;

import com.android.frame.adapter.CommonAdapter;
import com.android.frame.adapter.ViewHolder;
import com.kupurui.asteacher.R;
import com.kupurui.asteacher.bean.IndexClassInfo;
import com.kupurui.asteacher.bean.IndexInfo;

import java.util.List;

/**
 * Created by Administrator on 2017/7/18.
 */

public class IndexClassAdapter extends CommonAdapter<IndexInfo.ClassListBean> {

    public IndexClassAdapter(Context context, List<IndexInfo.ClassListBean> mList, int itemLayoutId) {
        super(context, mList, itemLayoutId);
    }

    @Override
    public void convert(ViewHolder holder, IndexInfo.ClassListBean item, int positon) {
        holder.setTextViewText(R.id.tv_school_name,"学校："+item.getSchool());
        holder.setTextViewText(R.id.tv_grade,"年级："+item.getGrade());
        holder.setTextViewText(R.id.tv_class_name,"班级："+item.getClass_name());
        holder.setTextViewText(R.id.tv_stu_num,"班级人数："+item.getStu_num()+"人");
    }
}
